import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex)

const store = new Vuex.Store({
        state: {
            customerNo: "20180413003",
            indexSelectPage: "1",
            registStatus: '0',  //0表示未注册,1表示已注册未审核,2标示审核通过
            refreshIndex:true,
            freeStatus:"1"//小区是否收费,0免费,1收费
        },
        getters: {
            customerNo(state){
                return state.customerNo
            },
            indexSelectPage(state) {
                return state.indexSelectPage
            },
            registStatus(state) {
                return state.registStatus
            },
            refreshIndex(state) {
                return state.refreshIndex
            },
            freeStatus(state) {
                return state.freeStatus
            }
        },
        mutations: {
            setCustomerNo(state, customerNo){
                state.customerNo = customerNo
            },
            setIndexSelectPage(state, indexSelectPage){
                state.indexSelectPage = indexSelectPage
            },
            setRegistStatus(state, registStatus){
                state.registStatus = registStatus
            },
            setRefreshIndex(state, refreshIndex){
                state.refreshIndex = refreshIndex
            },
            setFreeStatus(state, freeStatus){
                state.freeStatus = freeStatus
            }
        }
    })
;

export default store
